<template>
	<view>
		<view
			v-if="!loading && list.length > 0"
			class="bg-white pad-10"
		>
			<CustomStep
				:stepList="list"
				titleProp="name"
				contentProp="createTime"
			/>
		</view>
		
		<view v-if="list.length > 0" class="flex justify-center mar-t-40 pad-b-20 color-999999">
			<text>~ 没有更多数据了</text>
		</view>
		
		<!-- 页面加载 -->
		<u-loading-page :loading="loading" loadingText="加载中..." fontSize="16px"></u-loading-page>
		
		<!-- 空数据 -->
		<u-empty
			v-if="list.length === 0 && !loading" mode="data"
			text="~暂无数据"
			icon="http://cdn.uviewui.com/uview/empty/data.png"
		></u-empty>
	</view>
</template>

<script>
	import CustomStep from '@/components/CustomStep/index'
	
	export default {
		components: {
			CustomStep
		},
		
		data() {
			return {
				cartNum: '', // 车号
				loading: false, // 加载状态
				list: [], // 车辆相关数据列表
			}
		},
		
		onLoad(options) {
			this.cartNum = options.cartNum
			this.findCartInfos()
		},
		
		methods: {
			// 根据车号查询时间轴信息列表
			findCartInfos() {
				this.list = [
					{
						name: '张三',
						createTime: '2024/11/05',
						desc: '哈哈哈哈'
					}, {
						name: '李四',
						createTime: '2024/11/05',
						desc: '哈哈哈哈'
					}, {
						name: '赵六',
						createTime: '2024/11/05',
						desc: '哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈'
					}
				]
			}
		},
	}
</script>

<style lang="scss" scoped>
	
</style>